* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Helvetica Neue', Helvetica, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', '微软雅黑', Arial, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  height: 100vh;
  overflow: hidden;
}

#app {
  height: 100vh;
}

.chat-container {
  height: 100vh;
  display: flex;
  flex-direction: column;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(15px);
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.1);
  border-radius: 0;
}

.chat-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 25px;
  text-align: center;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  position: relative;
  overflow: hidden;
}

.chat-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, rgba(255,255,255,0.1) 0%, transparent 100%);
  pointer-events: none;
}

.chat-header h1 {
  font-size: 28px;
  font-weight: 600;
  margin-bottom: 8px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.chat-header p {
  font-size: 14px;
  opacity: 0.9;
  font-weight: 300;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 25px;
  background: linear-gradient(180deg, #f8f9fa 0%, #e9ecef 100%);
  position: relative;
}

.chat-messages::-webkit-scrollbar {
  width: 6px;
}

.chat-messages::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.05);
  border-radius: 3px;
}

.chat-messages::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 3px;
}

.message-item {
  margin-bottom: 25px;
  display: flex;
  align-items: flex-start;
  animation: fadeInUp 0.3s ease-out;
}

.message-item.user {
  justify-content: flex-end;
}

.message-content {
  max-width: 75%;
  padding: 16px 20px;
  border-radius: 20px;
  word-wrap: break-word;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  position: relative;
  line-height: 1.6;
  font-size: 14px;
}

.message-item.user .message-content {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-bottom-right-radius: 8px;
  box-shadow: 0 4px 20px rgba(102, 126, 234, 0.3);
}

.message-item.assistant .message-content {
  background: white;
  color: #333;
  border: 1px solid #e1e8ed;
  border-bottom-left-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.chat-input-area {
  padding: 25px;
  background: white;
  border-top: 1px solid #e1e8ed;
  position: relative;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.05);
}

.api-selector {
  position: absolute;
  bottom: 25px;
  left: 25px;
  z-index: 10;
}

.api-selector .el-select {
  min-width: 180px;
}

.input-container {
  display: flex;
  gap: 15px;
  align-items: flex-end;
}

.input-container .el-textarea {
  flex: 1;
}

.input-container .el-button {
  height: 80px;
  min-width: 80px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
  transition: all 0.3s ease;
}

.input-container .el-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.file-upload {
  margin-bottom: 15px;
}

.file-upload .el-upload-dragger {
  border: 2px dashed #d9d9d9;
  border-radius: 12px;
  background: #fafafa;
  transition: all 0.3s ease;
}

.file-upload .el-upload-dragger:hover {
  border-color: #667eea;
  background: #f0f2ff;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .chat-header {
    padding: 20px 15px;
  }

  .chat-header h1 {
    font-size: 24px;
  }

  .chat-messages {
    padding: 15px;
  }

  .message-content {
    max-width: 90%;
    padding: 12px 16px;
    font-size: 13px;
  }

  .chat-input-area {
    padding: 20px 15px;
  }

  .api-selector {
    position: static;
    margin-bottom: 15px;
  }

  .api-selector .el-select {
    width: 100%;
  }

  .input-container {
    flex-direction: column;
    gap: 10px;
  }

  .input-container .el-button {
    height: 50px;
    width: 100%;
  }
}

@media (max-width: 480px) {
  .chat-header {
    padding: 15px 10px;
  }

  .chat-messages {
    padding: 10px;
  }

  .message-content {
    max-width: 95%;
    padding: 10px 14px;
  }

  .chat-input-area {
    padding: 15px 10px;
  }
}

/* 加载动画 */
.loading-dots {
  display: inline-block;
}

.loading-dots::after {
  content: '';
  animation: dots 1.5s steps(5, end) infinite;
}

@keyframes dots {
  0%, 20% {
    color: rgba(0,0,0,0);
    text-shadow:
      .25em 0 0 rgba(0,0,0,0),
      .5em 0 0 rgba(0,0,0,0);
  }
  40% {
    color: #333;
    text-shadow:
      .25em 0 0 rgba(0,0,0,0),
      .5em 0 0 rgba(0,0,0,0);
  }
  60% {
    text-shadow:
      .25em 0 0 #333,
      .5em 0 0 rgba(0,0,0,0);
  }
  80%, 100% {
    text-shadow:
      .25em 0 0 #333,
      .5em 0 0 #333;
  }
}
